using System.Collections.Generic;

namespace Universe.OneC
{
    public class Cluster
    {
        private string _HostName;
        private List<InfoBase> _InfoBases;
        private int _MainPort;
        private string _Name;
        private string _Password;
        private ServerInfo _Server;
        private string _UserName;
        private List<WorkingProcess> _WorkingProcesses;

        private Cluster()
        {
            this._Name = "";
            this._HostName = "";
            this._MainPort = 0x605;
            this._UserName = "";
            this._Password = "";
            this._InfoBases = new List<InfoBase>();
            this._WorkingProcesses = new List<WorkingProcess>();
        }

        public Cluster(ServerInfo server)
        {
            this._Name = "";
            this._HostName = "";
            this._MainPort = 0x605;
            this._UserName = "";
            this._Password = "";
            this._InfoBases = new List<InfoBase>();
            this._WorkingProcesses = new List<WorkingProcess>();
            this._Server = server;
        }

        public override string ToString()
        {
            return this._Name;
        }

        public string Address
        {
            get
            {
                return ("tcp://" + this._HostName + ":" + this._MainPort.ToString());
            }
        }

        public string HostName
        {
            get
            {
                return this._HostName;
            }
            set
            {
                this._HostName = value;
            }
        }

        public List<InfoBase> InfoBases
        {
            get
            {
                return this._InfoBases;
            }
        }

        public int MainPort
        {
            get
            {
                return this._MainPort;
            }
            set
            {
                this._MainPort = value;
            }
        }

        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this._Name = value;
            }
        }

        public string Password
        {
            get
            {
                return this._Password;
            }
            set
            {
                this._Password = value;
            }
        }

        public ServerInfo Server
        {
            get
            {
                return this._Server;
            }
        }

        public string UserName
        {
            get
            {
                return this._UserName;
            }
            set
            {
                this._UserName = value;
            }
        }

        public List<WorkingProcess> WorkingProcesses
        {
            get
            {
                return this._WorkingProcesses;
            }
        }
    }
}